<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>设备信息</title>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  <script type="text/javascript">
  //编写自定义JS代码
  </script>
 </head>
 <body>
		 <t:formvalid formid="formobj" dialog="true" layout="table" 
  			  action="deviceAppointApplyController.do?doUpdate" tiptype="1" 
  			  callback="afterSuccessSubmit">
		<input id="deviceId" name="deviceId" type="hidden" value="${device.id}"> 
		<input name="id" type="hidden" value="${apply.id }"/>
		<table style=" " cellpadding="0" cellspacing="1" class="formtable">
				<tr>
					<td align="right">
						<label class="Validform_label">
							设备信息:
						</label>
					</td>
					<td class="value"> 
                	     品牌：${apply.device.brand.brandName}型号：${apply.device.model.modelName}编号:${apply.device.deviceNo}
					</td> 
				</tr> 
				<tr>
					<td align="right">
						<label class="Validform_label">
							申请领用时间:
						</label>
					</td>
					<td class="value"> 
                	    <input name="applyStartString" id="applyStartString" datatype='*' value="<fmt:formatDate value='${apply.applyStartDate}' pattern="yyyy-MM-dd HH:mm"/>">
							
						<span class="Validform_checktip"></span>
						<label class="Validform_label" style="display: none;">领用时间</label> 
					</td>
					 
				</tr>	
				<tr>
					<td align="right">
						<label class="Validform_label">
							申请归还时间:
						</label>
					</td>
					<td class="value"> 
                	    <input name="applyEndString" id="applyEndString" datatype='*' value="<fmt:formatDate value='${apply.applyEndDate}' pattern="yyyy-MM-dd HH:mm"/>">
							
						<span class="Validform_checktip"></span>
						<label class="Validform_label" style="display: none;">归还时间</label> 
					</td>
					 
				</tr>	
				 
				<tr>
					<td align="right">
						<label class="Validform_label">
							备注:
						</label>
					</td>
					<td class="value" colspan="4">
						  	 <textarea style="width:300px;height:100px;" class="inputxt" rows="6" id="remark" name="remark" maxlength="200">${apply.remark}</textarea>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">备注</label>
						</td>
			 
				</tr>
			</table>
		</t:formvalid>
 </body>
 <script>
  
 	
 	$(document).ready(function(){
 		//给时间控件加上样式
 			$("input[name='applyStartString']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'});});
 			$("input[name='applyEndString']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'});});
  });
 	
 	function afterSuccessSubmit(data){
 		if(data.success){
 			alert('申请保存成功，请到[预约申请]下提交申请！');
 		}
 	}
 
 	
 </script>